package com.jiangjiang.eshop.wms.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiangjiang.eshop.finance.convert.SendOutOrderItemConvert;
import com.jiangjiang.eshop.wms.dao.SendOutOrderItemMapper;
import com.jiangjiang.eshop.wms.domain.SendOutOrderItemEntity;
import com.jiangjiang.eshop.wms.dto.SendOutOrderItemDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName SendOutOrderItemService
 * @Description TODO
 * @Author jhw
 * @Date 2021/9/17 23:09
 * @Version 1.0
 **/
@Service
public class SendOutOrderItemService extends ServiceImpl<SendOutOrderItemMapper, SendOutOrderItemEntity> {

    @Autowired
    private SendOutOrderItemConvert sendOutOrderItemConvert;

    /**
     * 发货单条目数据批量保存
     * @param itemDTOList 发货单条目数据
     */
    public Boolean saveBatch(List<SendOutOrderItemDTO> itemDTOList) {
       return this.saveBatch(sendOutOrderItemConvert.convertDTO2Entity(itemDTOList));
    }
}
